package gui.launch;

import gui.WindowUtilities;

import java.awt.Container;
import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.GridLayout;
import java.awt.Insets;

import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JPanel;

import data.Color;

public class LaunchDialog extends JDialog {
	private static final long	serialVersionUID	= 2987411283410794890L;

	public LaunchDialog(){
		super();
		
		build();
	}
	
	public static void main(String[] args) {
		new LaunchDialog();
	}
	
	private void build() {    
		WindowUtilities.setNativeLookAndFeel();
		setTitle("Chessozor >> Select player");
		setModal(true);
		setResizable(true);
		setContentPane(buildContentPane());
		pack();
		setLocationRelativeTo(null);
		setVisible(true);
	}

	private Container buildContentPane() {
		JPanel panel = new JPanel();
		
		panel.setLayout(new GridLayout(0, 3));

		panel.add(new PlayerListPanel());
		panel.add(new PlayerPanel(Color.WHITE));
		panel.add(new PlayerPanel(Color.BLACK));
		
		return panel;
	}
}
